<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>一列布局</title>
</head>
<style>
    *{
        margin: 0;
        height:0;
    }
    .main{
        width: 800px;
        margin: 0 auto;
    }
    .left{
        width: 20%;
        height: 500px;
        background: red;
        float: left;
    }
    .right{
        width: 80%;
        height: 500px;
        height: 500px;
        background: #ddd;
        float: right;
    }

</style>
<body>
<div class="main">
    <div class="left"></div>
    <div class="right"></div>
</div>


</body>
</html>